package org.micode.demo.db.service.impl;

import lombok.extern.slf4j.Slf4j;
import org.micode.demo.db.dao.SysUserExtDao;
import org.micode.demo.db.domain.dto.SysUserExtDTO;
import org.micode.demo.db.domain.entity.SysUserExtDO;
import org.micode.demo.db.domain.query.SysUserExtQuery;
import org.micode.demo.db.service.DaoSysUserExtService;
import org.micode.libs.dao.base.BaseEditServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 系统用户扩展表，关联型(sys_user_ext) 服务实现类
 * <p>
 *
 * @author: wutianbin
 */
@Service
@Slf4j
public class DaoSysUserExtServiceImpl
        extends BaseEditServiceImpl<Long, SysUserExtDTO, SysUserExtDO, SysUserExtQuery, SysUserExtDao>
        implements DaoSysUserExtService {

    @Autowired
    private SysUserExtDao sysUserExtDao;

    @Override
    protected SysUserExtDao getMyDao() {
        return sysUserExtDao;
    }

    @Override
    public Integer deleteUserExtByUserId(Long userId) {
        return sysUserExtDao.deleteUserExtByUserId(userId);
    }

    @Override
    public SysUserExtDTO getByLoginName(String loginName) {
        return sysUserExtDao.getByLoginName(loginName);
    }

}
